#!/bin/bash

current_dir=$(cd $(dirname $0); pwd)

source /etc/profile
source $current_dir/../config.cfg

beeline -u "${hive_url}" -n bi-report -f $current_dir/idl_game_exposure_user_30d.sql
beeline -u "${hive_url}" -n bi-report -f $current_dir/idl_game_order_event_30d.sql
beeline -u "${hive_url}" -n bi-report -f $current_dir/idl_game_playee_cvr_30d.sql

/bigdata/flink/flink-1.10.2/bin/flink run -m yarn-cluster -ys 1 -p 3  -yjm 1024 -ytm 1024 -yd -ynm exposure_user_cvr_30d -yqu root.realtime_stat /home/hudong/work/bi-realtime-stat/bi-realtime-stat-test.jar /home/hudong/work/bi-realtime-stat/test/exposure_user_cvr_30d.json